// eslint-disable-next-line
import {
  UserLayout,
  BasicLayout,
  BlankLayout
} from '@/layouts'
import {
  bxAnaalyse
} from '@/core/icons'

const RouteView = {
  name: 'RouteView',
  render: h => h('router-view')
}

export const asyncRouterMap = [{
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: {
      title: '首页'
    },
    redirect: '/banner',
    children: [
      {
        path: '/banner',
        name: 'Banner',
        component: () => import( /* webpackChunkName: "Banner" */ '@/views/banner'),
        meta: {
          title: '图片列表',
          icon: 'picture'
        },
      },
      {
        path: '/technology',
        name: 'Technology',
        component: () => import( /* webpackChunkName: "Technology" */ '@/views/technology'),
        meta: {
          title: '新闻/案例/展会',
          icon: 'sound'
        },
      },
      // {
      //   path: '/download',
      //   name: 'Download',
      //   component: () => import( /* webpackChunkName: "Download" */ '@/views/donwload'),
      //   meta: {
      //     title: '下载资料',
      //     icon: 'download'
      //   },
      // },
      {
        path: '/product-serise',
        name: 'ProductSerise',
        component: () => import( /* webpackChunkName: "ProductSerise" */ '@/views/product-serise'),
        meta: {
          title: '产品系列',
          icon: 'sound'
        },
      },
      {
        path: '/product',
        name: 'Product',
        component: () => import( /* webpackChunkName: "Product" */ '@/views/product'),
        meta: {
          title: '产品管理',
          icon: 'sound'
        },
      },
      // {
      //   path: '/contactWay',
      //   name: 'ContactWay',
      //   component: () => import( /* webpackChunkName: "ContactWay" */ '@/views/contact-way'),
      //   meta: {
      //     title: '联系方式',
      //     icon: 'tag'
      //   },
      // },
      // {
      //   path: '/home-cata',
      //   name: 'HomeCata',
      //   component: () => import( /* webpackChunkName: "HomeCata" */ '@/views/home-cata'),
      //   meta: {
      //     title: '首页目录',
      //     icon: 'snippets'
      //   },
      // },
      // {
      //   path: '/message',
      //   name: 'Message',
      //   component: () => import( /* webpackChunkName: "Message" */ '@/views/message'),
      //   meta: {
      //     title: '留言管理',
      //     icon: 'aliwangwang'
      //   },
      // },
      // {
      //   path: '/chronicle',
      //   name: 'Chronicle',
      //   component: () => import( /* webpackChunkName: "Chronicle" */ '@/views/chronicle'),
      //   meta: {
      //     title: '大事记/荣誉',
      //     icon: 'twitter'
      //   },
      // },
      // {
      //   path: '/video',
      //   name: 'Video',
      //   component: () => import( /* webpackChunkName: "Video" */ '@/views/video'),
      //   meta: {
      //     title: '视频/照片/理念',
      //     icon: 'youtube'
      //   },
      // },
      {
        path: '/webMenu',
        name: 'WebMenu',
        component: () => import(/* webpackChunkName: "WebMenu" */ '@/views/web-menu'),
        meta: {title: '网站菜单',icon: 'slack'},
      },
      {
        path: '/system/settings',
        component: () => import('@/views/account/settings/Index'),
        redirect: '/system/settings/basic',
        name: 'settings',
        meta: {
          title: '网站设置',
          icon: 'setting',
          keepAlive: true
        },
        hideChildrenInMenu: true,
        children: [{
          path: '/system/settings/basic',
          name: 'BasicSettings',
          component: () => import('@/views/account/settings/BasicSetting'),
          meta: {
            title: '基本设置',
            hidden: true
          }
        }]
      }
    ]
  },
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [{
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [{
        path: 'login',
        name: 'login',
        component: () => import( /* webpackChunkName: "user" */ '@/views/user/Login')
      },
      {
        path: 'register',
        name: 'register',
        component: () => import( /* webpackChunkName: "user" */ '@/views/user/Register')
      },
      {
        path: 'register-result',
        name: 'registerResult',
        component: () => import( /* webpackChunkName: "user" */ '@/views/user/RegisterResult')
      },
      {
        path: 'recover',
        name: 'recover',
        component: undefined
      }
    ]
  },

  {
    path: '/404',
    component: () => import( /* webpackChunkName: "fail" */ '@/views/exception/404')
  }
]